public class Demo3 {
    public static Runnable runnable = new Runnable() {
    @Override
    public void run() {
        System.out.println("hello run");
    }
};
    public static void main(String[] args) {

        Thread thread = new Thread(runnable);
        thread.start();
    }
}
